# Date:   Thu Aug 28 09:00:26 PM 2025
# Mail:   lunar_ubuntu@qq.com
# Author: https://github.com/xiaoqixian

file(GLOB_RECURSE SRC "*.cpp")

include_directories(
  ${CMAKE_SOURCE_DIR}/src
  ${AVFORMAT_INCLUDE_DIRS}
  ${AVCODEC_INCLUDE_DIRS}
  ${AVUTIL_INCLUDE_DIRS}
  ${SWSCALE_INCLUDE_DIRS}   # optional
)
link_directories(
  ${AVFORMAT_LIBRARY_DIRS}
  ${AVCODEC_LIBRARY_DIRS}
  ${AVUTIL_LIBRARY_DIRS}
  ${SWSCALE_LIBRARY_DIRS}   # optional
)
add_executable(omni_cv ${SRC})
target_link_libraries(omni_cv PRIVATE
  pthread
  openvino::runtime
  ${OpenCV_LIBS}
  ${JSONCPP_LIBRARIES}
  yaml-cpp
  nlohmann-json
  ${AVFORMAT_LIBRARIES}
  ${AVCODEC_LIBRARIES}
  ${AVUTIL_LIBRARIES}
  ${SWSCALE_LIBRARIES}
)

target_compile_options(omni_cv PRIVATE
  -Wall
  -Wextra
  -Wpedantic
  -Wshadow
  # -Wconversion
  # -Wsign-conversion
  -Wformat=2
  -Wnull-dereference
  -Wdouble-promotion
)
